using UnityEngine;
using System.Collections;

// this requires a guitexture

public class MenuClickEvent : MonoBehaviour {
    public GROUP group;

	void Start()
	{
		
	}

	// Use this for initialization
	public void doTouchDown ()
    {
        int delay = 0;

        if(GameManager.b_ismax && GameManager.group == group)
        {
            EventManager<GROUP>.TriggerEvent(EventType.Minimize, group);
            return;
        }

        if (GameManager.b_ismax)
        {
            EventManager<GROUP>.TriggerEvent(EventType.Minimize, GROUP.ALL);
            delay = 1;
        }
        
        TimerMngr.Instance.Create(() => {
            EventManager<GROUP>.TriggerEvent(EventType.Maximize, group);
        }).Start(delay);
	}

	public void doTouchUp ()
    {
	    
	}
	
}
